package com.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class DemoPublisher {
	@Autowired
	ApplicationContext context;

	public void publisher() {
		context.publishEvent(new DemoEvent(this, "this is message"));
	}
}
